
using System;
using System.Data;
using System.Data.SqlClient; 
namespace HermesPortal.Core
{

    /// <summary>
    /// This object represents the properties and methods of a ChapterComment.
    /// </summary>

    public class ChapterComment
    {
        protected int _id;
        protected int _chapterID;
        protected string _body = String.Empty;
        protected int _creatorID;
        protected  DateTime _createdDate;

        public ChapterComment()
        {
        }

       

        internal ChapterComment(SqlDataReader reader)
        {
            this.LoadFromReader(reader);
        }

        protected void LoadFromReader(SqlDataReader reader)
        {
            if (reader != null && !reader.IsClosed)
            {
                _id = reader.GetInt32(0);
                if (!reader.IsDBNull(1)) _chapterID = reader.GetInt32(1);
                if (!reader.IsDBNull(2)) _body = reader.GetString(2);
                if (!reader.IsDBNull(3)) _creatorID = reader.GetInt32(3);
                if (!reader.IsDBNull(4)) _createdDate = reader.GetDateTime(4);
            }
        }

        #region Public Properties
        public int Id
        {
            get { return _id; }
        }

        public int ChapterID
        {
            get { return _chapterID; }
            set { _chapterID = value; }
        }

        public string body
        {
            get { return _body; }
            set { _body = value; }
        }

        public int CreatorID
        {
            get { return _creatorID; }
            set { _creatorID = value; }
        }

        public DateTime CreatedDate
        {
            get { return _createdDate; }
            set { _createdDate = value; }
        }
        #endregion

       
    }
 
}